<?php

namespace App\Constants\Common;

class CommonCode
{

    public const YES = 1;
    public const NO  = 2;

    public static function validSwitch($input=null)
    {
        $arr = [
            self::YES,
            self::NO,
        ];
        return $input ? in_array($input,$arr) : $arr;
    }
}